<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Task: Implement Developer Tests</title>
<meta name="uma.type" content="TaskDescriptor">
<meta name="uma.name" content="implement_developer_tests">
<meta name="uma.presentationName" content="Implement Developer Tests">
<meta name="uma.guid" content="_gXo2UNOKEdyqlogshP8l4g">
<meta name="element_type" content="TaskDescriptor">
<meta name="filetype" content="description">
<meta name="role" content="">
<link rel="StyleSheet" href="./../../css/default.css" type="text/css">
<script src="./../../scripts/ContentPageResource.js" type="text/javascript" language="JavaScript"></script><script src="./../../scripts/ContentPageSection.js" type="text/javascript" language="JavaScript"></script><script src="./../../scripts/ContentPageSubSection.js" type="text/javascript" language="JavaScript"></script><script src="./../../scripts/ActivityTreeTable.js" type="text/javascript" language="JavaScript"></script><script src="./../../scripts/ProcessElementPage.js" type="text/javascript" language="JavaScript"></script><script src="./../../scripts/ContentPageToolbar.js" type="text/javascript" language="JavaScript"></script><script src="./../../scripts/contentPage.js" type="text/javascript" language="JavaScript"></script><script src="./../../scripts/processElementData.js" type="text/javascript" language="JavaScript"></script><script type="text/javascript" language="JavaScript">
					var defaultQueryStr = '?proc=_RXGoodOFEdyqlogshP8l4g&path=_RXGoodOFEdyqlogshP8l4g,_gXo2UNOKEdyqlogshP8l4g';
					var backPath = './../../';
					var imgPath = './../../images/';
					var nodeInfo=null;
					contentPage.preload(imgPath, backPath, nodeInfo, defaultQueryStr, true, true, false);
				</script>
</head>
<body>
<div id="breadcrumbs"></div>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top">
<div id="page-guid" value="_gXo2UNOKEdyqlogshP8l4g"></div>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="pageTitle" nowrap="true">Task: Implement Developer Tests</td><td width="100%">
<div align="right" id="contentPageToolbar"></div>
</td><td width="100%" class="expandCollapseLink" align="right"><a name="mainIndex" href="./../../index.htm"></a><script language="JavaScript" type="text/javascript" src="./../../scripts/treebrowser.js"></script></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="pageTitleSeparator"><img src="./../../images/shim.gif" alt="" title="" height="1"></td>
</tr>
</table>
<div class="overview">
<table width="97%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50"><img src="./../../images/taskdes_lg_dgm32.gif" alt="" title=""></td><td>
<table class="overviewTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">Implement one or more tests that enable the validation of the individual implementation elements through execution.</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="sectionHeading">Purpose</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td class="sectionTableSingleCell">Prepare to validate an implementation element (e.g. an operation, a class, a stored procedure) through unit testing. The
result is one or more new developer tests.</td>
</tr>
</table>
</div>
<div class="sectionHeading">Relationships</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<th class="sectionTableHeading" scope="row">Roles</th><td class="sectionTableCell" width="30%"><span class="sectionTableCellHeading">Main:
								</span>
<ul>
<li>
<a href="./../../process.openup.base/capabilitypatterns/developer_A9B88A4E.html" guid="_frYNQNOKEdyqlogshP8l4g">Developer</a>
</li>
</ul>
</td><td class="sectionTableCell" width="30%"><span class="sectionTableCellHeading">Additional:
								</span>
<ul>
<li>
<a href="./../../process.openup.base/capabilitypatterns/tester_6E4A6C6D.html" guid="_frYNRNOKEdyqlogshP8l4g">Tester</a>
</li>
</ul>
</td><td class="sectionTableCell"><span class="sectionTableCellHeading">Assisting:
								</span></td>
</tr>
<tr valign="top">
<th class="sectionTableHeading" scope="row">Inputs</th><td class="sectionTableCell" width="30%"><span class="sectionTableCellHeading">Mandatory:
								</span>
<ul>
<li>
<a href="./../../process.openup.base/capabilitypatterns/software_implementation_slot_E32AE6DF.html" guid="_gX7xQNOKEdyqlogshP8l4g">[Software Implementation]</a>
</li>
</ul>
</td><td class="sectionTableCell" width="30%"><span class="sectionTableCellHeading">Optional:
								</span>
<ul>
<li>
<a href="./../../process.openup.base/capabilitypatterns/software_design_slot_D1C3FAF5.html" guid="_gX7xQdOKEdyqlogshP8l4g">[Software Design]</a>
</li>
</ul>
</td><td class="sectionTableCell"><span class="sectionTableCellHeading">External:
								</span>
<ul>
<li>None</li>
</ul>
</td>
</tr>
<tr valign="top">
<th class="sectionTableHeading" scope="row">Outputs</th><td class="sectionTableCell" colspan="3">
<ul>
<li>
<a href="./../../process.openup.base/capabilitypatterns/developer_test_DC61DB05.html" guid="_gX7xQtOKEdyqlogshP8l4g">DeveloperTest</a>
</li>
</ul>
</td>
</tr>
</table>
</div>
<div class="sectionHeading">Main Description</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td class="sectionTableSingleCell"><p>
    Developer testing is different from other forms of testing in that it is based on the expected behavior of code units
    rather than being directly based on the system requirements.
</p>
<p>
    It is best to do this at a small scale, much smaller than the complete code base to be authored by a developer over the
    course of an iteration. This can be done for one operation, one field added to a user interface, one stored procedure,
    etc. As the code base is incrementally built, new tests will be authored and existing tests might be revisited to test
    additional behavior.
</p></td>
</tr>
</table>
</div>
<div class="sectionHeading">Steps</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="sectionTableCell">
<div class="stepHeading">Refine scope and identify the test(s)</div>
<div class="stepContent">
<table class="stepTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td><p>
    Select the increment of work to be tested and identify developer test(s)&nbsp;to verify that the software
    implementation&nbsp;being developed behaves correctly. One source for the expected behavior for an implementation
    element is the software design.
</p>
<p>
    In identifying the&nbsp;tests or in any other part of this task, consider collaborating with a team member who is
    well-versed in the issues of testing.
</p></td>
</tr>
</table>
</div>
<div class="stepHeading">Write the test setup</div>
<div class="stepContent">
<table class="stepTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td>To successfully run a test the system must be in a known state so that the correct behavior can be defined. Implement the
setup logic that must be performed as part of the developer test.</td>
</tr>
</table>
</div>
<div class="stepHeading">Define the expected results</div>
<div class="stepContent">
<table class="stepTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td><p>
    Define the expected results of each test so that it can be verified.
</p>
<p>
    After a test runs, you need to be able to compare the results of running the test against what was expected to happen.
    The test is successful when the actual results match the expected results.
</p></td>
</tr>
</table>
</div>
<div class="stepHeading">Write the test logic</div>
<div class="stepContent">
<table class="stepTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td>Write the steps that perform the actual test(s).</td>
</tr>
</table>
</div>
<div class="stepHeading">Define the test response</div>
<div class="stepContent">
<table class="stepTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td>Define the information the test(s) must produce to successfully indicate success or failure. Consider if a response of True
or False is sufficient, or if a detailed message should be logged as well.</td>
</tr>
</table>
</div>
<div class="stepHeading">Write clean-up code</div>
<div class="stepContent">
<table class="stepTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td>Identify, and then implement, the steps to be followed in order to restore the environment to the original state for each
test. The goal is to ensure that there are no side effects from running the tests.</td>
</tr>
</table>
</div>
<div class="stepHeading">Test the test</div>
<div class="stepContent">
<table class="stepTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td><p>
    Verify that each developer test works correctly. To do this:
</p>
<ul>
    <li>
        Run the test(s), observe their behavior, and fix any defects in the tests.
    </li>
    <li>
        Ensure that the expected results are defined properly and that they're being checked correctly.
    </li>
    <li>
        Check the clean-up logic for each test.
    </li>
    <li>
        Ensure that each developer test works within your test suite framework.
    </li>
</ul></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<div class="sectionHeading">Properties</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<th class="sectionTableHeading" scope="row" id="property_Multiple Occurrences" abbr="Multiple Occurrences">Multiple Occurrences</th><td class="sectionTableCell" align="left" headers="property_Multiple Occurrences"><img width="20" height="15" alt="" title="" src="./../../images/indent.gif"></td>
</tr>
<tr valign="top">
<th class="sectionTableHeading" scope="row" id="property_Event Driven" abbr="Event Driven">Event Driven</th><td class="sectionTableCell" align="left" headers="property_Event Driven"><img width="20" height="15" alt="" title="" src="./../../images/indent.gif"></td>
</tr>
<tr valign="top">
<th class="sectionTableHeading" scope="row" id="property_Ongoing" abbr="Ongoing">Ongoing</th><td class="sectionTableCell" align="left" headers="property_Ongoing"><img width="20" height="15" alt="" title="" src="./../../images/indent.gif"></td>
</tr>
<tr valign="top">
<th class="sectionTableHeading" scope="row" id="property_Optional" abbr="Optional">Optional</th><td class="sectionTableCell" align="left" headers="property_Optional"><img width="20" height="15" alt="" title="" src="./../../images/indent.gif"></td>
</tr>
<tr valign="top">
<th class="sectionTableHeading" scope="row" id="property_Planned" abbr="Planned">Planned</th><td class="sectionTableCell" align="left" headers="property_Planned"><img width="20" height="15" alt="Yes" title="Yes" src="./../../images/true.gif"></td>
</tr>
<tr valign="top">
<th class="sectionTableHeading" scope="row" id="property_Repeatable" abbr="Repeatable">Repeatable</th><td class="sectionTableCell" align="left" headers="property_Repeatable"><img width="20" height="15" alt="" title="" src="./../../images/indent.gif"></td>
</tr>
</table>
</div>
<div class="sectionHeading">Key Considerations</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td class="sectionTableSingleCell"><ol>
    <li>
        Automate tests via a unit regression testing tool (for example, xUnit) so that tests may be run by developers
        whenever they make changes to the code.
    </li>
    <li>
        Test to the risk of the implementation element. For example, the more critical an element is, the more important it
        is to test it thoroughly.
    </li>
    <li>
        Pair with&nbsp;team members with testing skills&nbsp;in all steps of this task to gain insight on testing and
        quality considerations.
    </li>
</ol>
<p>
    The&nbsp;<a class="elementLink" href="./../../core.mgmt.slot.base/workproducts/project_work_slot_F12BAC46.html" guid="_1QZI8EfUEdyiPI8btkmvmw">[Project Work]</a> is implicitly used in implementation tasks to manage which requirements
    or change requests are being realized in the code.
</p></td>
</tr>
</table>
</div>
<div class="sectionHeading">Alternatives</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td class="sectionTableSingleCell">Rely on acceptance tests to validate your software. This will likely be time consuming, late, and not as effective as
developer testing in identifying bugs and finding their location in the code.</td>
</tr>
</table>
</div>
<div class="sectionHeading">More Information</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<th class="sectionTableHeading" scope="row">Concepts</th><td class="sectionTableCell">
<ul>
<li>
<a href="./../../core.tech.common.extend_supp/guidances/concepts/developer_testing_FEBDAED6.html" guid="_ADwlAJRtEdyrdaw_xGakyw">Developer Testing</a>
</li>
</ul>
</td>
</tr>
</table>
</div>
<table class="copyright" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="copyright"><p> This program and the accompanying materials are made available under the<br />
  <a href="http://www.eclipse.org/org/documents/epl-v10.php" target="_blank">Eclipse 
  Public License V1.0</a>, which accompanies this distribution. </p><p/><p> <a class="elementLink" href="./../../core.default.release_copyright.base/guidances/supportingmaterials/openup_copyright_C3031062.html" guid="_UaGfECcTEduSX6N2jUafGA">OpenUP Copyright</a></p></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<script language="JavaScript" type="text/javascript">
					contentPage.onload();
					contentPage.processPage.fixDescriptorLinks();
				</script>
</html>
